package com.lyf.task.domain;

import java.util.Date;

public class Trade {

	private int tid;

	private int pid;

	private int uid;
	private User user;
	private Product product;

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	private double price;

	private Date tradeTime;

	public Trade() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString() {
		return "Trade [tid=" + tid + ", pid=" + pid + ", uid=" + uid + ", user=" + user + ", product=" + product
				+ ", price=" + price + ", tradeTime=" + tradeTime + "]";
	}

	public Trade(int tid, int pid, int uid, double price, Date tradeTime) {
		super();
		this.tid = tid;
		this.pid = pid;
		this.uid = uid;
		this.price = price;
		this.tradeTime = tradeTime;
	}

	public Trade(int pid, int uid, double price, Date tradeTime) {
		super();

		this.pid = pid;
		this.uid = uid;
		this.price = price;
		this.tradeTime = tradeTime;
	}

	public int getTid() {
		return tid;
	}

	public int getPid() {
		return pid;
	}

	public int getUid() {
		return uid;
	}

	public double getPrice() {
		return price;
	}

	public Date getTradeTime() {
		return tradeTime;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public void setTradeTime(Date tradeTime) {
		this.tradeTime = tradeTime;
	}

}
